project(core)

include_directories(../3rd)
include_directories(../3rd/lua)

aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} CORE_SOURCES)

find_package(Threads)

if(CMAKE_SYSTEM_NAME MATCHES "Windows")
    add_definitions(-D_CRT_SECURE_NO_WARNINGS)
    add_definitions(-DLUA_BUILD_AS_DLL)
    add_definitions(-DLUA_LIB)
endif()

add_library(hive SHARED ${CORE_SOURCES})
target_link_libraries(hive liblua ${CMAKE_THREAD_LIBS_INIT} mimalloc)
